<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{

    protected function _initDoctype()
    {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        $view->doctype('XHTML1_STRICT');
		$view->headLink()->appendStylesheet('/css/style.css');
		$view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
		$view->headTitle()->setSeparator(' - ');
		$view->headTitle('Ziekenhuis V1.1');
				
		
    }
	
	protected function _initAutoload() 	
	{ 		
		$moduleLoader = new Zend_Application_Module_Autoloader(array(
			'namespace' => '', 			
			'basePath' => APPLICATION_PATH
	    ));
	    
		return $moduleLoader; 	
	}
	
	protected function _initDbAdapter()
	{
		$registry = Zend_Registry::getInstance();
		
		$resource = $this->getPluginResource('db');
		$dbAdapter = $resource->getDbAdapter();
		
		$registry->set('db', $dbAdapter);
		
	}
	
    protected function _initPluginload()
    {
		
        $this->bootstrap('frontController');
		$front = $this->getResource('frontController');
		
		$front->registerPlugin(new Plugin_AccessPlugin());
		
		$front->registerPlugin(new Plugin_MenuPlugin());
		$front->registerPlugin(new Plugin_UserInfoPlugin());
    
    }	
    
    protected function _initAcl()
    {
        $this->bootstrap('frontController');
		$front = $this->getResource('frontController');
        
        $acl = new Zhlib_Acl();
        $front->registerPlugin(new Plugin_AclPlugin($acl));
    }
	
}

